<?php

class AuthorizationService
{    
	protected $_model;

	public function __construct()
	{
		$this->_model = $this->_getModel();
	}
 
 	protected function _getModel()
    {
		if (null === $this->_model) {
			require_once APPLICATION_PATH . '/models/UserModel.php';
            $this->_model = new Model_UserModel();
        }
        return $this->_model;
    }
  
  	public function login($user)
	{
		//$login, $pass
		$arr = $this->_model->loginEntry($user->login, $user->pass);
		return $arr;        
	}

}